
using System.Security.Cryptography.X509Certificates;
using WebIds4Svr;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddIdentityServer()
    .AddSigningCredential(new X509Certificate2(Path.Combine(".", "certs", "IdentityServer4Auth.pfx")))
    //        .AddDeveloperSigningCredential(persistKey: false)
    .AddInMemoryApiScopes(Config.GetApiScopes())
    .AddInMemoryApiResources(Config.GetApis())
    .AddInMemoryClients(Config.GetClients())
    .AddTestUsers(Config.GetUsers());

var app = builder.Build();


app.UseIdentityServer();

app.MapGet("/", () => "Hello World!");

app.Run();
